import axios from "axios";
// http://localhost:3002/

const request = axios.create({
    baseURL: "http://api.webxiaohua.cn/",
});

export const post = ({ url, data, success, fail }) => {
    request.defaults.headers.common['Content-Type'] = 'multipart/form-data';
    request
        .post(url, data)
        .then(res => {
            success(res.data);
        })
        .catch(fail);
};